package com.booter.controller;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class HelloController {

    @Resource
    private FlowExecutor flowExecutor;

    @RequestMapping("hello")
    public String hello(){

        LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg");
        System.out.println(response);
        return "ok";
    }
}
